<!doctype html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('合同审批表打印')" />
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>合同审批表</title>
</head>
<style>
    * {
    	font-size: 18px;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        color: #444;
    }

    h2.title {
        text-align: center;
        width: 980px;
        margin: 20px auto;
        font-size: 40px;
        font-weight: 600;
    }

    .tableBox {
        width: 980px;
        margin: 10px auto;
    }

    .tableHeadContent {
        width: 100%;
    }

    .tableHeadContent p {
        width: 45%;
        display: inline-block
    }

    .tableHeadContent p.right {
        float: right;
        text-align: right;
    }

    .tableHeadContent i {
        text-decoration: underline;
        font-style: normal;
        display: inline-block;
    }

    .tips {
        width: 980px;
        margin: 20px auto;
        font-size: 15px;
        color: #666;
    }

    .printTable {
        width: 100%;
        margin: 10px auto;
    }
    .printTable td{
        text-align: center;
        height:90px;
        padding: 15px 5px;
    }

    .printTable input[type="checkbox"] {
        margin-right: 3px;
        transform: translateY(2px);
    }
    .printTable label{
        margin-right: 15px;
        cursor: pointer;
    }
    .printTable .content {
        text-align: left;
        padding: 100px 10px;
    }
    .table .examine {
        height: 120px;
    }
    .fa{
    	color:#fff;
    }
    @media print{
	   body {
	       height: auto !important;
	   }
	}
</style>

<body>
	<input type="hidden" id="zilwj" name="zilwj" th:value="${zilwjvo}" />
	<input type="hidden" id="zilwjzs" name="zilwjzs" th:value="${sjContract.zilwjzs}" />
   	<input type="hidden" id="zilwjvo" name="zilwjvo" th:field="${sjContract.zilwj}" />
	<!-- 打印网页时通过hidden-print隐藏元素 -->
    <div class="text-right hidden-print">
        <button class="btn btn-primary" onclick="printPage()"><i class="fa fa-print"></i> 打印</button>
    </div>
    <h2 class="title">合同审批表</h2>
    <div class="tableBox">
        <div class="tableHeadContent">
            <p>合同编号：<i><span th:text="${sjContract.orderNo}"></span>
                </i></p>
            <!-- 填充下划线 -->
            <p class="right">单据日期：<i><span th:text="${#dates.format(sjContract.createAt, 'yyyy年MM月dd日')}"></span></i></p>
        </div>
        <table class="printTable" border="1" cellpadding="0" cellspacing="0">
            <tr>
                <td width="150px">申报部门</td><td width="150px" th:text="${sjContract.dept}"></td>
                <td width="150px">申报人</td><td width="150px" th:text="${sjContract.owner}"></td>
                <td width="150px">附件数</td><td width="150px" th:text="${sjContract.fjs}"></td>
            </tr>
            <tr>
                <td>申报类别</td>
                <td colspan="5">
                    <label for="type1_1">
                    	<input type="checkbox" disabled="disabled" th:if="${sjContract.type} eq 0" checked name="type1" id="type1_1">
                    	<input type="checkbox" disabled="disabled" th:unless="${sjContract.type} eq 0" name="type1" id="type1_1">设计合同
                    </label>
                    <label for="type1_2">
                    	<input type="checkbox" disabled="disabled" th:if="${sjContract.type} eq 1" checked name="type1" id="type1_2">
                    	<input type="checkbox" disabled="disabled" th:unless="${sjContract.type} eq 1"  name="type1" id="type1_2">分包合同
                    </label>
                    <label for="type1_3">
                    	<input type="checkbox" disabled="disabled" th:if="${sjContract.type} eq 2" checked name="type1" id="type1_3">
                    	<input type="checkbox" disabled="disabled" th:unless="${sjContract.type} eq 2"  name="type1" id="type1_3">居间协议
                    </label>
                    <label for="type1_4">
                    	<input type="checkbox" disabled="disabled" th:if="${sjContract.type} eq 3" checked name="type1" id="type1_4">
                    	<input type="checkbox" disabled="disabled" th:unless="${sjContract.type} eq 3"  name="type1" id="type1_4">合作协议
                    </label>
                </td>
            </tr>
            <tr>
                <td>项目名称</td>
                <td colspan="5" th:text="${sjContract.projectName}"></td>
            </tr>
            <tr>
                <td>项目规模：<br>(平方米)</td> <td colspan="2" th:text="${sjContract.xmgm}"></td>
                <td>项目类型</td> <td colspan="2" th:with="type=${@dict.getLabel('sj_proType','__${sjContract.proType}__')}" th:text="${type}"></td>
            </tr>
            <tr>
                <td>合同金额</td> <td colspan="2" th:text="${sjContract.htje}"></td>
                <td>大写</td> <td colspan="2" th:text="${sjContract.htjedx}"></td>
            </tr>
            <tr>
                <td>合同对方</td>
                <td colspan="5" th:text="${sjContract.customerName}"></td>
            </tr>
            <tr>
                <td>工作内容</td>
                <td colspan="5" class="content" >
                	<p th:text="${sjContract.descs}" style="text-align: center;"></p>
                </td>
            </tr>
<!--             <tr> -->
<!--                 <td>法务审核意见</td> -->
<!--                 <td colspan="5" ><span th:text="${sjContract.fwsh}"></span>(<span th:text="${sjContract.fwshyj}"></span>)</td> -->
<!--             </tr> -->
            <tr>
                <td>运营中心意见</td>
                <td colspan="5" ><span th:text="${sjContract.yyzxsh}"></span>(<span th:text="${sjContract.yyzxshyj}"></span>)</td>
            </tr>
            <tr>
                <td class="examine">申报部门审核</td><td colspan="2" ><span th:text="${sjContract.sbbmsh}"></span>(<span th:text="${sjContract.sbbmshyj}"></span>)</td>
                <td class="examine">项目董事（事业部负责人）审核</td><td colspan="2" ><span th:text="${sjContract.xmfzrsh}"></span>(<span th:text="${sjContract.xmfzrshyj}"></span>)</td>
            </tr>
            <tr>
                <td class="examine">会计（成本）审核意见</td><td colspan="2" ><span th:text="${sjContract.hjsh}"></span>(<span th:text="${sjContract.hjshyj}"></span>)</td>
                <td class="examine">副总经理意见</td><td colspan="2" ><span th:text="${sjContract.fzjlsh1}"></span>(<span th:text="${sjContract.fzjlshyj1}"></span>)</td>
            </tr>
            <tr>
                <td class="examine">副总经理意见</td><td colspan="2"><span th:text="${sjContract.fzjlsh2}"></span>(<span th:text="${sjContract.fzjlshyj2}"></span>)</td>
                <td class="examine">总经理意见</td><td colspan="2" ><span th:text="${sjContract.zjlsh}"></span>(<span th:text="${sjContract.zjlshyj}"></span>)</td>
            </tr>
        </table>
    </div>
    <div class="tips">
        	注：1、所有合同经过审批放可盖章。2、非第一事业部项目，由其他事业部负责人（所长）审核后，由总经理审核即可。
    </div>
	<div class="tips">
        <div style="margin-top: 8px;" id="zilwjlink" />
    </div>
	<th:block th:include="include :: footer" />
    <script type="text/javascript">
        function printPage() {
            window.print();
        }
        
        $(function() {
			var zilwj = $("#zilwjvo").val();
        	
        	var n=zilwj.split(",");
        	for(var i=0;i<n.length;i++){
//         		var url = "http://lkgnews.cn:8012/onlinePreview?url="+encodeURIComponent(Base64.encode(n[i]));
        		var url = n[i];
        		$("#zilwjlink").append("提审合同文件：<a href='"+url+"' target='_blank' >"+n[i]+"</a><br>");
        	}
        	
			var zilwjzs = $("#zilwjzs").val();
        	
        	var n=zilwjzs.split(",");
        	for(var i=0;i<n.length;i++){
//         		var url = "http://lkgnews.cn:8012/onlinePreview?url="+encodeURIComponent(Base64.encode(n[i]));
        		var url = n[i];
        		$("#zilwjlink").append("<br>正式合同文件：<a href='"+url+"' target='_blank' >"+n[i]+"</a><br>");
        	}
        	
        });

    </script>
</body>
</html>